<div id="foodcollocation-index">

        <div class="nav">
            <a href="__APP__/FoodCollocation/index">全部</a>
            <volist name="foodsectioninfo" id="vo">
                <a href="__APP__/FoodCollocation/index/sid/<{$vo.id}>"><{$vo.name}></a>
            </volist>
        </div>

        <notempty name="foodcategoryinfo">
            <div class="cnav">
                <volist name="foodcategoryinfo" id="vo">
                    <a href="__APP__/FoodCollocation/index/sid/<{$Think.get.sid}>/cid/<{$vo.id}>"><{$vo.name}></a>
                </volist>
            </div>
        </notempty>

        <div class="search">
            <a class="adds" href="__APP__/FoodCollocation/add">添加搭配</a>
            <notempty name="orgname">
                <a href="__APP__/FoodCollocation/edit/sid/<{$Think.get.sid}>/cid/<{$Think.get.cid}>/id/<{$Think.get.id}>" style="float:left;">修改【<{$orgname.name}>】的搭配</a>
            </notempty>

            <empty name="Think.get.sid">
                    <form action="__APP__/FoodCollocation/index" method="post" class="select">
                <else/>
                    <form action="__APP__/FoodCollocation/index/sid/<{$Think.get.sid}>" method="post" class="select">
            </empty>
                    关键字 <input type="text" name="key" /> 按
                    <select name="search">
                        <option value="1">ID</option>
                    </select>
                    <empty name="list">
                        <input type="submit" value="搜索" disabled="disabled" />
                        <else />
                        <input type="submit" value="搜索" />
                    </empty>
                </form>

        </div>


        <form action="__APP__/FoodCollocation/del" method="post" name="delete" class="delete">

            <table>
                <thead>

                <tr>
                    <th style="width:50px;">ID</th>
                    <switch name="Think.get.position">
                        <case value="left">
                            <th style="width:100px;">搭配食材</th>
                            <th></th>
                            <th style="width:100px;">目标食材</th>
                         </case>
                        <case value="right">
                            <th style="width:100px;">目标食材</th>
                            <th></th>
                            <th style="width:100px;">搭配食材</th>
                        </case>
                        <default/>
                        <th style="width:100px;">搭配食材</th>
                        <th></th>
                        <th style="width:100px;">目标食材</th>
                    </switch>
                    <th style="width:50px;">忌宜</th>
                    <th>描述</th>
                    <th class="action" style="width:50px;"><input class="allselect" type="button" value="全选" /></th>
                </tr>

                </thead>

                <tbody>

                <empty name="list">

                    <tr><td colspan="7" style="height:77px;">暂无数据</td></tr>

                    <else/>

                    <volist name="list" id="vo">
                            <tr>
                                    <td><{$vo.id}></td>

                                <switch name="Think.get.position">

                                    <case value="left">

                                        <td class="img" style="width:70px;height:70px;" title="<{$vo.orgarticle.name}>" >
                                            <a href="__APP__/FoodCollocation/index/position/left/sid/<{$vo.sectionid}>/cid/<{$vo.categoryid}>/id/<{$vo.articleid}>">
                                                <img src="__PUBLIC__/Content/FoodArticle/thumb_<{$vo.orgarticle.image}>" />
                                                <p><{$vo.orgarticle.name}></p>
                                            </a>
                                        </td>
                                        <td style="width:10px;">+</td>
                                        <td class="img" style="width:70px;height:70px;" title="<{$vo.destarticle.name}>">
                                            <a href="__APP__/FoodCollocation/index/position/right/sid/<{$vo.destsectionid}>/cid/<{$vo.destcategoryid}>/id/<{$vo.destarticleid}>">
                                                <img src="__PUBLIC__/Content/FoodArticle/thumb_<{$vo.destarticle.image}>" />
                                                <p><{$vo.destarticle.name}></p>
                                            </a>
                                        </td>

                                    </case>

                                    <case value="right">

                                        <td class="img" style="width:70px;height:70px;" title="<{$vo.destarticle.name}>" >
                                            <a href="__APP__/FoodCollocation/index/position/right/sid/<{$vo.destsectionid}>/cid/<{$vo.destcategoryid}>/id/<{$vo.destarticleid}>">
                                                <img src="__PUBLIC__/Content/FoodArticle/thumb_<{$vo.destarticle.image}>" />
                                                <p><{$vo.destarticle.name}></p>

                                            </a>
                                        </td>
                                        <td style="width:10px;">+</td>
                                        <td class="img" style="width:70px;height:70px;" title="<{$vo.orgarticle.name}>">
                                            <a href="__APP__/FoodCollocation/index/position/left/sid/<{$vo.sectionid}>/cid/<{$vo.categoryid}>/id/<{$vo.articleid}>">
                                                <img src="__PUBLIC__/Content/FoodArticle/thumb_<{$vo.orgarticle.image}>" />
                                                <p><{$vo.orgarticle.name}></p>
                                            </a>
                                        </td>

                                    </case>

                                    <default />

                                        <td class="img" style="width:70px;height:70px;" title="<{$vo.orgarticle.name}>" >
                                            <a href="__APP__/FoodCollocation/index/position/left/sid/<{$vo.sectionid}>/cid/<{$vo.categoryid}>/id/<{$vo.articleid}>">
                                                <img src="__PUBLIC__/Content/FoodArticle/thumb_<{$vo.orgarticle.image}>" />
                                                <p><{$vo.orgarticle.name}></p>
                                            </a>
                                        </td>
                                        <td style="width:10px;">+</td>
                                        <td class="img" style="width:70px;height:70px;" title="<{$vo.destarticle.name}>">
                                            <a href="__APP__/FoodCollocation/index/position/right/sid/<{$vo.destsectionid}>/cid/<{$vo.destcategoryid}>/id/<{$vo.destarticleid}>">
                                                <img src="__PUBLIC__/Content/FoodArticle/thumb_<{$vo.destarticle.image}>" />
                                                <p><{$vo.destarticle.name}></p>
                                            </a>
                                        </td>

                                </switch>
                                <switch name="vo.goodorbad">

                                    <case value="0">
                                        <td>无</td>
                                    </case>

                                    <case value="1">
                                        <td>宜</td>
                                    </case>

                                    <case value="2">
                                        <td>忌</td>
                                    </case>

                                </switch>

                                    <td><{$vo.description}></td>
                                    <td><input type="checkbox" name="actions[]" value="<{$vo.id}>" rowspan="2" /></td>
                            </tr>
                    </volist>

                </empty>

                </tbody>

                <tfoot>
                    <empty name="show">
                        <tr><td class="fpage" colspan="7">暂无数据</td></tr>
                        <else/>
                        <tr><td class="fpage" colspan="6"><{$show}></td><td><input class="buttondel" type="button" value="删除" /></td></tr>
                    </empty>
                </tfoot>
            </table>

        </form>
</div>
<script type="text/javascript" src="../Public/js/foodcollocation.js"></script>